home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / examples / chap06 / DoubleFace.wrl next >
Text File  |  1996-10-14  |  1KB  |  51 lines

  1. #VRML V2.0 utf8
  2.  
  3. #
  4. # show the difference of single face and double face.
  5. #
  6.  
  7. # single face wall
  8. Transform{
  9.         translation 0 -5 0
  10.         children[
  11.         Shape{
  12.                 geometry IndexedFaceSet{
  13.                         coord DEF COORD Coordinate{
  14.                                 point[  
  15.                                         0 0 0,          #0
  16.                                         10 0 0,         #1
  17.                                         10 10 0,        #2
  18.                                         0 10 0,         #3
  19.                                 ]
  20.                         }
  21.                         coordIndex [0, 1, 2, 3, -1]
  22.                         solid TRUE
  23.                 }
  24.                 appearance Appearance{
  25.                         material Material{
  26.                                 diffuseColor 1 0 0      # red
  27.                         }
  28.                 }
  29.         }
  30.         ]
  31. }
  32.  
  33. # double face wall
  34. Transform{
  35.         translation -10 -5 0
  36.         children[
  37.         Shape{
  38.                 geometry IndexedFaceSet{
  39.                         coord USE COORD
  40.                         coordIndex [0, 1, 2, 3, -1]
  41.                         solid FALSE
  42.                 }
  43.                 appearance Appearance{
  44.                         material Material{
  45.                                 diffuseColor 0 1 0      # green
  46.                         }
  47.                 }
  48.         }
  49.         ]
  50. }
  51.